<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 2016/9/18
 * Time: 14:24
 */


//$im = imagegrabscreen();
//imagepng($im, "myscreenshot.png");
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$im = imagegrabwindow($handle);
$browser->Quit();
imagepng($im, "iesnap.png");
$im = imagegrabscreen();